Fix Jerone Young's xenstat / xenstore patch:
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 27 Oct 2005 09:53:02 +0000 (10:53 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 27 Oct 2005 09:53:02 +0000 (10:53 +0100)
Reject the removal of -Werror from the xentop Makefile.

Reject the #include of xs.h inside xentop -- there is no need for it.

Have XendDomainInfo write domain names into /local/domain (which used to happen,
but hasn't for a little while).

Remove the dead code from xentop.c.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendDomainInfo.py
tools/xenstat/xentop/Makefile
tools/xenstat/xentop/xentop.c

index 11256f891636eb41586511f55201bada60094518..999716219d56ab4c6fa1a6eb3adcf4928e246763 100644 (file)
@@ -595,6 +595,7 @@ class XendDomainInfo:
         to_store = {
             'domid':              str(self.domid),
             'vm':                 self.vmpath,
+            'name':               self.info['name'],
             'console/limit':      str(xroot.get_console_limit() * 1024),
             'memory/target':      str(self.info['memory_KiB'])
             }
index 2115e6f3cf741d43fe74446648658bd26a577728..633fd570646d639f1dc9627271a62b2229764b7c 100644 (file)
@@ -26,7 +26,7 @@ mandir=$(prefix)/share/man
 man1dir=$(mandir)/man1
 sbindir=$(prefix)/sbin
 
-CFLAGS += -DGCC_PRINTF -Wall -I$(XEN_LIBXENSTAT)
+CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
 LDFLAGS += -L$(XEN_LIBXENSTAT)
 LDLIBS += -lxenstat -lncurses
 
index 286b0370517927ab4229cf9d9b25c01156d9b2d1..050f95bfcb23374971386461ecd63f5d00af9548 100644 (file)
@@ -28,7 +28,6 @@
 #include <time.h>
 #include <unistd.h>
 
-#include <xs.h>
 #include <xenstat.h>
 
 #define XENTOP_VERSION "1.0"
@@ -68,8 +67,6 @@ static int compare_domains(xenstat_domain **, xenstat_domain **);
 static unsigned long long tot_net_bytes( xenstat_domain *, int);
 
 /* Field functions */
-static int compare_domid(xenstat_domain *domain1, xenstat_domain *domain2);
-static void print_domid(xenstat_domain *domain);
 static int compare_state(xenstat_domain *domain1, xenstat_domain *domain2);
 static void print_state(xenstat_domain *domain);
 static int compare_cpu(xenstat_domain *domain1, xenstat_domain *domain2);
@@ -131,7 +128,6 @@ typedef struct field {
 } field;
 
 field fields[] = {
-//     { FIELD_DOMID,   "DOMID",      5, compare_domid,   print_domid   },
        { FIELD_NAME,    "NAME",      10, compare_name,    print_name    },
        { FIELD_STATE,   "STATE",      6, compare_state,   print_state   },
        { FIELD_CPU,     "CPU(sec)",  10, compare_cpu,     print_cpu     },
@@ -349,18 +345,6 @@ static int compare_domains(xenstat_domain **domain1, xenstat_domain **domain2)
 
 /* Field functions */
 
-/* Compares domain ids of two domains, returning -1,0,1 for <,=,> */
-int compare_domid(xenstat_domain *domain1, xenstat_domain *domain2)
-{
-       return compare(xenstat_domain_id(domain1), xenstat_domain_id(domain2));
-}
-
-/* Prints domain identification number */
-void print_domid(xenstat_domain *domain)
-{
-       print("%5u", xenstat_domain_id(domain));
-}
-
 /* Compare domain names, returning -1,0,1 for <,=,> */
 int compare_name(xenstat_domain *domain1, xenstat_domain *domain2)
 {